



<div class="bjui-pageContent tableContent" id="div1">
    <table>
        <div id="chiptrend" style="width:100%;height:80%;" ></div>
        <script  src="${request.getContextPath()}/js/echarts/echarts.js"></script>
        <script  src="${request.getContextPath()}/js/echarts/echarts-tool.js"></script>
        <g:if test="${chiptrendrpt.size()>0}">
            <script type="text/javascript">
                // 基于准备好的dom，初始化echarts实例
                var contextPath = "${request.getContextPath()}";
                eChartsTool.init(contextPath);
                var data=[];
                <g:each in="${chiptrendrpt}" status="i" var="tableInstance">
                data.push('${tableInstance.TIME}')
                </g:each>

                // 指定图表的配置项和数据
                var option = {
                    title: {
                        text: '碎片率趋势看板',
                        textStyle:{fontSize:25}
                    },
                    tooltip: {},
                    legend: {
                        data:['碎片率(%)','目标碎片率(%)'],
                        textStyle:{fontSize:25}

                    },
                    xAxis: {
                        "axisLabel":{
                            "interval":0,
                            "rotate":45,
                            textStyle:{fontSize:15}
                        },
                        data:data

                    },
                    yAxis : [
                        {
                            type : 'value',
                            name:'',
                            textStyle:{fontSize:25},
                            axisLabel : {
                                formatter: '{value}',
                                textStyle:{fontSize:25}
                            },
                            show:true
                        }
                    ],
                    series: [{
                        name: '碎片率(%)',
                        type: 'line',
                        data: ${chiptrendrpt.CHIP_YIELD},
                        markPoint : {
                            data : [
                                {type : 'max', name: '最大值'},
                                {type : 'min', name: '最小值'}
                            ]
                        },
                        markLine : {
                            data : [
                                {type : 'average', name: '平均值'}
                            ]
                        }
                    },

                        {
                            name: '目标碎片率(%)',
                            type: 'line',
                            data: ${chiptrendrpt.TARGET_CHIP_YIELD},
                            markPoint : {
                                data : [
                                    {type : 'max', name: '最大值'},
                                    {type : 'min', name: '最小值'}
                                ]
                            },
                            markLine : {
                                data : [
                                    {type : 'average', name: '平均值'}
                                ]
                            }
                        }]
                };

                // 使用刚指定的配置项和数据显示图表。
                eChartsTool.setOption("helianthus", document.getElementById('chiptrend'), option);

            </script>
        </g:if>
    </table>
</div>